﻿import QtQuick 2.15

Item {
    width: screenWidth
    height: screenHeight

    Item{
        id:backGround
        anchors.fill: parent
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 200
        anchors.left: backGround.left
        anchors.leftMargin: 10
        color: "#0b49b0"
        border.width: 1
        border.color: "#008edd"
        width: 1060
        height: 1400

        Column{
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 10
            spacing: 40

            Repeater{
                model:11

                Rectangle{
                    width: 200
                    height: 80
                    color: "transparent"

                    Text{
                        anchors.centerIn: parent
                        font.pixelSize: 40
                        font.bold: true
                        color: "white"
                        text:index === 0 ? "刀 盘" :
                             index === 1 ? "胶 辊" :
                             index === 2 ? "压力1":
                             index === 3 ? "压力2":
                             index === 4 ? "压力3":
                             index === 5 ? "前刀1":
                             index === 6 ? "前刀2":
                             index === 7 ? "前刀3":
                             index === 8 ? "后刀1":
                             index === 9 ? "后刀2":
                                           "后刀3"
                    }
                }
            }
        }


        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 10
            anchors.left: parent.left
            anchors.leftMargin: 220
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"当前值"
            }
        }

        Column{
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 220
            spacing: 40

            Repeater{
                model:11

                Rectangle{
                    width: 200
                    height: 80
                    color: "#00adfb"
                    radius: 10
                    border.width: 1
                    border.color: "#008edd"

                    Text{           // 当前位置
                        anchors.centerIn: parent
                        font.pixelSize: 40
                        font.bold: true
                        color: "white"
                        text:index === 0 ? Cpp_Connect.knifeCurrLocation :
                             index === 1 ? Cpp_Connect.rollerCurrLocation :
                             index === 2 ? Cpp_Connect.stress01CurrLocation :
                             index === 3 ? Cpp_Connect.stress02CurrLocation :
                             index === 4 ? Cpp_Connect.stress03CurrLocation :
                             index === 5 ? Cpp_Connect.f_knife01CurrLocation :
                             index === 6 ? Cpp_Connect.f_knife02CurrLocation :
                             index === 7 ? Cpp_Connect.f_knife03CurrLocation :
                             index === 8 ? Cpp_Connect.b_knife01CurrLocation :
                             index === 9 ? Cpp_Connect.b_knife02CurrLocation :
                                           Cpp_Connect.b_knife03CurrLocation
                    }
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 10
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "transparent"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text:"设定值"
            }
        }



        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 刀盘定位位置
                id:knifeLocation
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.knifeLocation
            }

            TextInput{
                id:knifeLocation_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:knifeLocation.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     knifeLocation.text = knifeLocation_Input.text
                //     knifeLocation_Input.visible = false
                //     knifeLocation.visible = true
                // }
                onAccepted: {
                    knifeLocation_Input.visible = false
                    knifeLocation.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3044",knifeLocation_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    knifeLocation.visible = false
                    knifeLocation_Input.visible = true
                    knifeLocation_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 胶辊定位位置
                id:rollerLocation
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.rollerLocation
            }

            TextInput{
                id:rollerLocation_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:rollerLocation.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     rollerLocation.text = rollerLocation_Input.text
                //     rollerLocation_Input.visible = false
                //     rollerLocation.visible = true
                // }
                onAccepted: {
                    rollerLocation_Input.visible = false
                    rollerLocation.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3048",rollerLocation_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    rollerLocation.visible = false
                    rollerLocation_Input.visible = true
                    rollerLocation_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力1定位位置
                id:stress01Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress01Location
            }

            TextInput{
                id:stress01Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress01Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress01Location.text = stress01Location_Input.text
                //     stress01Location_Input.visible = false
                //     stress01Location.visible = true
                // }
                onAccepted: {
                    stress01Location_Input.visible = false
                    stress01Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3052",stress01Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress01Location.visible = false
                    stress01Location_Input.visible = true
                    stress01Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力2定位位置
                id:stress02Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress02Location
            }

            TextInput{
                id:stress02Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress02Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress02Location.text = stress02Location_Input.text
                //     stress02Location_Input.visible = false
                //     stress02Location.visible = true
                // }
                onAccepted: {
                    stress02Location_Input.visible = false
                    stress02Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3056",stress02Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress02Location.visible = false
                    stress02Location_Input.visible = true
                    stress02Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 压力3定位位置
                id:stress03Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.stress03Location
            }

            TextInput{
                id:stress03Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:stress03Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     stress03Location.text = stress03Location_Input.text
                //     stress03Location_Input.visible = false
                //     stress03Location.visible = true
                // }
                onAccepted: {
                    stress03Location_Input.visible = false
                    stress03Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3060",stress03Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    stress03Location.visible = false
                    stress03Location_Input.visible = true
                    stress03Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀1定位位置
                id:f_Knife01Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife01Location
            }

            TextInput{
                id:f_Knife01Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife01Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife01Location.text = f_Knife01Location_Input.text
                //     f_Knife01Location_Input.visible = false
                //     f_Knife01Location.visible = true
                // }
                onAccepted: {
                    f_Knife01Location_Input.visible = false
                    f_Knife01Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3064",f_Knife01Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife01Location.visible = false
                    f_Knife01Location_Input.visible = true
                    f_Knife01Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀2定位位置
                id:f_Knife02Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife02Location
            }

            TextInput{
                id:f_Knife02Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife02Location.text
                //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife02Location.text = f_Knife02Location_Input.text
                //     f_Knife02Location_Input.visible = false
                //     f_Knife02Location.visible = true
                // }
                onAccepted: {
                    f_Knife02Location_Input.visible = false
                    f_Knife02Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3068",f_Knife02Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife02Location.visible = false
                    f_Knife02Location_Input.visible = true
                    f_Knife02Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 前刀3定位位置
                id:f_Knife03Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.f_knife03Location
            }

            TextInput{
                id:f_Knife03Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:f_Knife03Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     f_Knife03Location.text = f_Knife03Location_Input.text
                //     f_Knife03Location_Input.visible = false
                //     f_Knife03Location.visible = true
                // }
                onAccepted: {
                    f_Knife03Location_Input.visible = false
                    f_Knife03Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3072",f_Knife03Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    f_Knife03Location.visible = false
                    f_Knife03Location_Input.visible = true
                    f_Knife03Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀1定位位置
                id:b_Knife01Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife01Location
            }

            TextInput{
                id:b_Knife01Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife01Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife01Location.text = b_Knife01Location_Input.text
                //     b_Knife01Location_Input.visible = false
                //     b_Knife01Location.visible = true
                // }
                onAccepted: {
                    b_Knife01Location_Input.visible = false
                    b_Knife01Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3076",f_Knife01Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife01Location.visible = false
                    b_Knife01Location_Input.visible = true
                    b_Knife01Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀2定位位置
                id:b_Knife02Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife02Location
            }

            TextInput{
                id:b_Knife02Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife02Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife02Location.text = b_Knife02Location_Input.text
                //     b_Knife02Location_Input.visible = false
                //     b_Knife02Location.visible = true
                // }
                onAccepted: {
                    b_Knife02Location_Input.visible = false
                    b_Knife02Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3080",f_Knife02Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife02Location.visible = false
                    b_Knife02Location_Input.visible = true
                    b_Knife02Location_Input.forceActiveFocus()
                }
            }
        }
        Rectangle{
            width: 200
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 430
            color: "#00adfb"
            radius: 10
            border.width: 1
            border.color: "#008edd"

            Text{           // 后刀3定位位置
                id:b_Knife03Location
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.b_knife03Location
            }

            TextInput{
                id:b_Knife03Location_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:b_Knife03Location.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     b_Knife03Location.text = b_Knife03Location_Input.text
                //     b_Knife03Location_Input.visible = false
                //     b_Knife03Location.visible = true
                // }
                onAccepted: {
                    b_Knife03Location_Input.visible = false
                    b_Knife03Location.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3084",f_Knife03Location_Input.text)
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    b_Knife03Location.visible = false
                    b_Knife03Location_Input.visible = true
                    b_Knife03Location_Input.forceActiveFocus()
                }
            }
        }


        /////////////////////刀盘 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","1024")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","512")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 100
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","32768")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////胶辊 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","4096")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","2048")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 220
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","1")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////压力1 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"后退"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","16384")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"前进"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","8192")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 340
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","2")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////压力2 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"后退"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","1")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"前进"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","32768")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 460
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","4")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////压力3 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"后退"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","4")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"前进"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","2")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 580
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","8")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////前刀1 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","16")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","8")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 700
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","16")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////前刀2 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","64")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","32")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 820
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","32")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////前刀3 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","256")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","128")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2000","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 940
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","64")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////后刀1 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","1024")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","512")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1060
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","128")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        /////////////////////后刀2 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","4096")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","2048")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1180
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2004","256")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2004","0")
                }
            }
        }
        /////////////////////后刀3 - 操作按钮//////////////
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 640
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"下降"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","16384")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 780
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"上升"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","8192")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2002","0")
                }
            }
        }
        Rectangle{
            width: 130
            height: 80
            anchors.top: parent.top
            anchors.topMargin: 1300
            anchors.left: parent.left
            anchors.leftMargin: 920
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:"启动"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2004","512")
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2004","0")
                }
            }
        }

    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 1620
        anchors.left: backGround.left
        anchors.leftMargin: 10
        color: "#0b49b0"
        border.width: 1
        border.color: "#008edd"
        width: 400
        height: 100

        Text{
            anchors.verticalCenter: parent.verticalCenter
            anchors.left: parent.left
            anchors.leftMargin: 10
            font.pixelSize: 30
            font.bold: true
            color: "white"
            text:"输送速率"
        }

        Rectangle{
            anchors.verticalCenter: parent.verticalCenter
            anchors.right: parent.right
            anchors.rightMargin: 10
            width: 230
            height: 80
            radius: 10
            color:"#0088d0"

            Text{           // 变频器速度
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                color: "white"
                text:Cpp_Connect.transducerSpeed
            }
        }
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 1620
        anchors.right: backGround.right
        anchors.rightMargin: 10
        color: "#0b49b0"
        border.width: 1
        border.color: "#008edd"
        width: 650
        height: 100

        Text{
            anchors.verticalCenter: parent.verticalCenter
            anchors.left: parent.left
            anchors.leftMargin: 10
            font.pixelSize: 30
            font.bold: true
            color: "white"
            text:"手动调整速率"
        }

        Rectangle{
            anchors.verticalCenter: parent.verticalCenter
            anchors.left: parent.left
            anchors.leftMargin: 210
            width: 230
            height: 80
            radius: 10
            color:"#0088d0"

            Text{           // 手动速率
                id:manualSpeed
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: Cpp_Connect.manualSpeedRate
            }

            TextInput{
                id:manualSpeed_Input
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                visible: false
                color: "white"
                selectByMouse: true
                maximumLength: 8
                //@disabel-check M16
                // verticalAlignment: Text.verticalAlignment
                horizontalAlignment: Text.horizontalAlignment
                text:manualSpeed.text
                // //@disabel-check M16
                // onEditingFinished: {
                //     manualSpeed.text = manualSpeed.text
                //     manualSpeed_Input.visible = false
                //     manualSpeed.visible = true
                // }
                onAccepted: {
                    manualSpeed_Input.visible = false
                    manualSpeed.visible = true
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3448",manualSpeed_Input.text);
                }
            }

            MouseArea{
                anchors.fill: parent
                acceptedButtons: Qt.LeftButton
                //@disabel-check M16
                propagateComposedEvents: true

                onClicked: {
                    mouse.accepted = false
                    manualSpeed.visible = false
                    manualSpeed_Input.visible = true
                    manualSpeed_Input.forceActiveFocus()
                }
            }
        }

        Rectangle{
            width: 90
            height: 80
            anchors.right: parent.right
            anchors.rightMargin: 110
            anchors.verticalCenter: parent.verticalCenter
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: "下调"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"                    
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3448",--manualSpeed_Input.text);
                }
            }
        }
        Rectangle{
            width: 90
            height: 80
            anchors.right: parent.right
            anchors.rightMargin: 10
            anchors.verticalCenter: parent.verticalCenter
            radius: 10
            color: "#2b6ec5"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                color: "white"
                text: "上调"
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#e44034"                    
                }

                onReleased: {
                    parent.color = "#2b6ec5"
                    Cpp_Connect.write_modbus_tcp_TwoHoldingResgisters("3448",++manualSpeed_Input.text);
                }
            }
        }

    }

}
